package com.dao;

import com.model.Orders;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrdersMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Orders record);

    int insertSelective(Orders record);

    Orders selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Orders record);

    int updateByPrimaryKey(Orders record);

    Orders selectByOrderNumber(@Param("out_trade_no") String out_trade_no);

    Orders selectGiveBackOrderByCustomerId(@Param("customerId") Long customerId);

    List<Orders> selectOrderListByCondition(Orders condition);

    Orders selectRecentPayedRechargeOrderByCustomerId(@Param("customerId")Long customerId);

    List<Orders> selectCustomerValidatedOrderList(@Param("customerId")Long customerId);

    List<Orders> selectCustomerValidatedRentOrderList(@Param("customerId")Long customerId);

    List<Orders> selectCustomerValidatedSaleOrderList(@Param("customerId")Long customerId);

    List<Orders> selectCustomerValidatedRechargeOrderList(@Param("customerId")Long customerId);

}